package com.niiwoo.civet.account.enums;

import com.niiwoo.tripod.provider.exception.NoSuchEnumValueException;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 银行卡作废类型枚举
 * @author TomXue
 * @since 2018-08-03
 */
@AllArgsConstructor
@Getter
public enum BankCardDelTypeEnum {
    REBIND((byte) 1, "换绑"),
    UNBIND((byte) 2, "解绑");

    private Byte type;
    private String desc;

    public static BankCardDelTypeEnum enumOf(Byte value) {
        for (BankCardDelTypeEnum type : values()) {
            if (type.type.equals(value)) {
                return type;
            }
        }
        throw new NoSuchEnumValueException("BankCardDelTypeEnum:" + value);
    }

}
